// http://192.168.20.5:8080/api/v1/Plan/search
import httpAxios from "@/utilx/http/axios.ts";
import {PageResult, SearchById, SearchWithPage} from "@/typex";
import {AxiosResult, cloud} from "@/api/dto";


export namespace PlanApi {
    const routeGroup = "plan"
    export const PlanSearch = async (data: SearchWithPage<cloud.PlanReq>): AxiosResult<PageResult<cloud.Plan>> => httpAxios.post(routeGroup.concat("/search"), data);
    export const PlanAdd = async (data: any): AxiosResult<boolean> => httpAxios.post(routeGroup.concat("/add"), data);
    export const PlanUpd = async (data: any): AxiosResult<boolean> => httpAxios.post(routeGroup.concat("/upd"), data);
    export const PlanGet = async (data: SearchById): AxiosResult<cloud.Plan> => httpAxios.post(routeGroup.concat("/get"), data);
}

